This invention concerns a method for determining a position code arranged on a surface. More particularly the invention concerns a method and a device for determining a virtual raster of a position code.
In many situations it is desirable to be able to determine an absolute position on a surface. One example concerns the digitization of drawings. Another example is when an electronic version of handwritten information is required.
Examples of prior-art devices for position determination are found, for example, in U.S. Pat. No. 5,852,434 which describes a device for determining an absolute position. The device comprises a writing surface which is provided with a position-coding pattern by means of which X-Y-coordinates can be determined, a detector which can detect the position-coding pattern and a processor which, on the basis of the detected position-coding pattern, can determine the position of the detector relative to the writing surface. The device makes it possible for a user to enter handwritten and hand-drawn information into a computer at the same time as the information is being written/drawn on the writing surface.
Three examples of position coding are given in U.S. Pat. No. 5,852,434. The first example is symbols, each of which is constructed of three concentric circles. The outer circle represents the X-coordinate and the middle circle the Y-coordinate. Both the outer circles are additionally divided into 16 parts which, depending upon whether they are filled in or not, indicate different numbers. This means that each pair of coordinates X, Y is coded by a complex symbol with a particular appearance.
In the second example, the coordinates of each point on the writing surface are given by means of bar-codes, a bar-code for the X-coordinate being shown above a bar-code for the Y-coordinate.
A checkered pattern which can be used to code the X- and Y-coordinates is given as a third example. However, there is no explanation as to how the checkered pattern is constructed or how it can be converted into coordinates.
A problem with the known pattern is that it is constructed of complex symbols and the smaller these symbols are made, the more difficult it is to produce the patterned writing surface and the greater the risk of incorrect position determinations, while the larger the symbols are made, the poorer the position resolution becomes.
A further problem is that the processing of the detected position-coding pattern becomes rather complicated, due to the fact that a processor has to interpret complex symbols.
An additional problem is that the detector must be constructed in such a way that it can record four symbols at the same time so that it is certain to cover at least one symbol in its entirety, which is necessary in order for the position determination to be able to be carried out. The ratio between the required sensor surface and the surface of the position-coding pattern which defines a position is thus large.
In Swedish Patent Application No. 9903541-2, which has been assigned to the Applicant, a position code is described which can advantageously be used according to the invention. The position code consists of a raster and marks which are situated at each raster point. The marks are preferably essentially circular and are displaced relative to the raster points in one of four orthogonal directions. The raster is virtual and is thus invisible both to the eye and to sensors.
In order to decode the above-mentioned position code the virtual raster must be recreated. The recreation of the raster is the subject matter of this invention.
The object of this invention is to provide a method and a device for determining of a virtual raster of a position code of the above-mentioned type.
More particularly, the code pattern consists of a plurality of marks with associated coordinates, each mark being located at a nominal position but displaced from the nominal position in one of a plurality of directions, depending upon the value of the mark. The nominal positions form raster points of the virtual raster, and the raster points are situated on raster lines which intersect at a first angle.
According to the invention, first an initial vector V1,2 is determined on the basis of the coordinates m1, m2, of one or more marks, which initial vector extends approximately between a first and a second adjacent raster point g1, g2. Subsequently a second vector is determined, which forms said angle with the first vector and is the same length as the first vector and extends from the second raster point approximately to a third raster point. The mark which is associated with the third raster point is determined, after which the actual coordinates for the third raster point are calculated on the basis of the coordinates of the third mark and its value. The actual coordinates are stored and used later as the starting point for calculating the next vector.
In this way the raster points are determined one by one, progressing across the surface with the marks in steps. By means of this process being carried out in steps, each vector is corrected immediately by comparison with the associated coordinates. Any error in the image caused by perspective or other distortions can be tolerated without the decoding being adversely affected.
According to the invention, the initial vector is preferably determined as the vector which connects the two marks which are the least distance apart of a set of marks, the vector being extended on each side by a distance corresponding to the displacement of the marks from the associated raster point. The code pattern is so constructed that two adjacent marks which are situated close to each other must be on the raster line and displaced towards each other. This is utilized advantageously for determining the initial vector. Subsequently all calculations are carried out using the coordinates of the marks.
The method according to the invention is best utilized in association with an essentially orthogonal square raster grid. In addition each mark is preferably displaced along a raster line, by a distance corresponding to between xe2x85x9 and xc2xc, preferably ⅙, of the distance between two raster points. In this way the raster points can easily be determined based on the coordinates of the marks.
The coordinates of the marks are suitably determined as the center of gravity of the whole mark. The marks are usually obtained as an image on a sensor which has a plurality of pixels, each mark taking up more than one pixel on the sensor surface.